"""
@Author  : 吕申凯
@Time    : 2022/9/18 18:17
@File    : common_tools.py
@Function: 
"""
import random
import numpy as np
import torch


def set_seed(seed):
    """
        设置随机种子
    :param seed: 随机种子
    :return:
    """
    random.seed(seed)
    np.random.seed(seed)
    torch.manual_seed(seed)
    torch.cuda.manual_seed(seed)
